package com.logicfishsoftware.plugbench

import org.eclipse.xtext.junit4.InjectWith
import org.eclipse.xtext.junit4.XtextRunner
import org.junit.runner.RunWith
import org.eclipse.xtext.junit4.util.ParseHelper
import static org.junit.Assert.*
import com.google.inject.Inject
import org.junit.Test
import com.logicfishsoftware.plugbench.wPPlugBench.Plugin
import com.logicfishsoftware.plugbench.wPPlugBench.Option

@InjectWith(typeof(WPPlugBenchInjectorProvider))
 @RunWith(typeof(XtextRunner))
class PlugbenchTests {
	@Inject
 ParseHelper<Plugin> parser

 @Test 
def void parsePluginModel() {
   val model = parser.parse(
     "entity MyEntity {
       parent: MyEntity
     }")
   val option = model.options.options.head as Option
   //assertSame(entity, entity.features.head.type)
 } 
}